#ifndef QRSAGSMAPFLASHTOOL_H
#define QRSAGSMAPFLASHTOOL_H

#include <QPoint>
#include <QCursor>
#include <QPixmap>
#include <QMessageBox>

#include "qgsmaptool.h"
#include "qgsproject.h"
#include "qgsmapsettings.h"
#include "qgsmaprendererparalleljob.h"
#include "qrsagsmapflash.h"
#include "qgsmapcanvas.h"
#include "qgslayertree.h"
#include "qgslayertreeview.h"

class QRSAGSMapFlashTool : public QgsMapTool
{
public:
    QRSAGSMapFlashTool(QgsMapCanvas *mapCanvas = nullptr, QgsLayerTreeView * layerTreeVeiw = nullptr);
    ~QRSAGSMapFlashTool();

    QgsMapCanvas *mMapCanvas = nullptr;
    QgsLayerTreeView *mLayerTreeView = nullptr;

    QRSAGSMapFlash *mMapFlash = nullptr;
    bool disableFlash = false;

    QTimer *mTimer;

    void activateConnect();

signals:
    void deactivateConnect();

public:
    void activate();
    void deactivate();

private slots:
    void setMap();
    void disable();
    void setLayerFlash();
    void setMapFlashOpacity();
};

#endif // QRSAGSMAPFLASHTOOL_H
